#ifndef __SocketIO_H__
#define __SocketIO_H__

namespace wd
{


class SocketIO
{
public:
    SocketIO(int fd);

    int sendn(const char * buff, int len);
    int recvn(char * buff, int len);

    //一次获取一行数据
    int readline(char * buff, int max);

    //判断内核接收缓冲区有多少个字节
    int peek() const;

private:
    int _fd;
};



}//end of namespace wd


#endif

